Skip to content

Support pickleability of classes with callable args#728

Merged
mauvilsa merged 7 commits into
mauvilsa:mainfrom
euxhenh:eh/fix-pickleability-callable-args
Jun 10, 2025
Merged

Support pickleability of classes with callable args#728
mauvilsa merged 7 commits into
mauvilsa:mainfrom
euxhenh:eh/fix-pickleability-callable-args

Conversation

@euxhenh

@euxhenh euxhenh commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

  • adapt_class_type: Replaced the locally defined partial_instance wrapper function with a functools.partial call to construct class instantiators, ensuring they are compatible with pickle and other serialization libraries.

See discussion in #727 for more context.

Before submitting

  • Did you read the contributing guideline?
  • [n/a] Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good! Just do a small fix in the changelog.

Comment thread CHANGELOG.rst Outdated
euxhenh and others added 3 commits June 9, 2025 09:51
Co-authored-by: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com>
@euxhenh

euxhenh commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

@mauvilsa Thank you! I updated the changelog.

@codecov

codecov Bot commented Jun 10, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b111f10) to head (88e454c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #728   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         6859      6857    -2     
=========================================
- Hits          6859      6857    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mauvilsa
mauvilsa merged commit 6ad1dd6 into mauvilsa:main Jun 10, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants